package com.aurora.source.authority.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import com.aurora.source.R;
import com.aurora.source.authority.bean.ProcessListBean;
import com.aurora.source.base.BaseRecyclerAdapter;
import com.aurora.source.base.CommonHolder;

import butterknife.BindView;

/**
 * @author: ww
 * @description:列出权限
 * @date: 2018/9/29
 */
public class ProcessListAdapter extends BaseRecyclerAdapter<ProcessListBean> {


    @Override
    public CommonHolder<ProcessListBean> setViewHolder(ViewGroup parent) {
        return new MyHolder(parent.getContext(), parent, R.layout.item_process);
    }

    public class MyHolder extends CommonHolder<ProcessListBean> {
        @BindView(R.id.tv_process)
        TextView tvProcess;
        public MyHolder(Context context, ViewGroup root, int layoutRes) {
            super(context, root, layoutRes);
        }

        @Override
        public void bindData(ProcessListBean processListBean, int positon) {
            tvProcess.setText(processListBean.getProcessTitle());
        }
    }
}
